package com.ruoyi.wechat.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wechat.mapper.CampUserMapper;
import com.ruoyi.wechat.domain.CampUser;
import com.ruoyi.wechat.service.ICampUserService;

/**
 * 露营用户Service业务层处理
 */
@Service
public class CampUserServiceImpl implements ICampUserService
{
    @Autowired
    private CampUserMapper campUserMapper;

    /**
     * 查询露营用户
     *
     * @param userId 露营用户主键
     * @return 露营用户
     */
    @Override
    public CampUser selectCampUserByUserId(String userId)
    {
        return campUserMapper.selectCampUserByUserId(userId);
    }

    /**
     * 查询露营用户列表
     *
     * @param campUser 露营用户
     * @return 露营用户
     */
    @Override
    public List<CampUser> selectCampUserList(CampUser campUser)
    {
        return campUserMapper.selectCampUserList(campUser);
    }

    /**
     * 新增露营用户
     *
     * @param campUser 露营用户
     * @return 结果
     */
    @Override
    public int insertCampUser(CampUser campUser)
    {
        return campUserMapper.insertCampUser(campUser);
    }

    /**
     * 修改露营用户
     *
     * @param campUser 露营用户
     * @return 结果
     */
    @Override
    public int updateCampUser(CampUser campUser)
    {
        return campUserMapper.updateCampUser(campUser);
    }

    /**
     * 批量删除露营用户
     *
     * @param userIds 需要删除的露营用户主键
     * @return 结果
     */
    @Override
    public int deleteCampUserByUserIds(String[] userIds)
    {
        return campUserMapper.deleteCampUserByUserIds(userIds);
    }

    /**
     * 删除露营用户信息
     *
     * @param userId 露营用户主键
     * @return 结果
     */
    @Override
    public int deleteCampUserByUserId(String userId)
    {
        return campUserMapper.deleteCampUserByUserId(userId);
    }

    @Override
    public CampUser selectCampUserByOpenId(String openId) {
        return campUserMapper.selectCampUserByOpenId(openId);
    }
}
